import request from '@/utils/request'

// 创建检验方案产品关联
export function createInspectSchemeItem(data) {
  return request({
    url: '/qms/inspect-scheme-item/create',
    method: 'post',
    data: data
  })
}

// 更新检验方案产品关联
export function updateInspectSchemeItem(data) {
  return request({
    url: '/qms/inspect-scheme-item/update',
    method: 'put',
    data: data
  })
}

// 删除检验方案产品关联
export function deleteInspectSchemeItem(id) {
  return request({
    url: '/qms/inspect-scheme-item/delete?id=' + id,
    method: 'delete'
  })
}

// 获得检验方案产品关联
export function getInspectSchemeItem(id) {
  return request({
    url: '/qms/inspect-scheme-item/get?id=' + id,
    method: 'get'
  })
}

// 获得检验方案产品关联分页
export function getInspectSchemeItemPage(query) {
  return request({
    url: '/qms/inspect-scheme-item/page',
    method: 'get',
    params: query
  })
}

// 导出检验方案产品关联 Excel
export function exportInspectSchemeItemExcel(query) {
  return request({
    url: '/qms/inspect-scheme-item/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
